package com.juli.school.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.juli.school.dao.entity.Back;
import com.juli.school.dao.mapper.BackMapper;
import com.juli.school.utils.core.model.CommonResp;

/**
 * @Description: 意见反馈
 * @author: wjp
 * @date: 2018年1月29日下午10:04:35
 */
@Service
public class BackService {

	private static final Logger logger = LoggerFactory.getLogger(BackService.class);

	@Resource
	BackMapper backMapper;

	public CommonResp<String> add(Back back) {
		CommonResp<String> commonResp = new CommonResp<String>();
		try {
			backMapper.insert(back);
			commonResp.success();
		} catch (Exception e) {
			logger.error("新增意见反馈信息异常", e);
			commonResp.exception("新增见反馈信息异常" + e.getMessage());
		}
		return commonResp;
	}
}
